package com.luckyframe.project.jmeter.jmeterTestPlanMetric.enums;

import java.util.Objects;

public enum PlanMetricStatusEnum {

    NOT_STARTED(0,"未开始"),

    EXECUTING(1,"执行中"),

    SUCCESS(2,"执行成功"),

    FAIL(3,"执行失败");



    private int code;

    private String desc;

    PlanMetricStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    PlanMetricStatusEnum(int code) {
        this.code = code;
    }


    public static boolean isExecuting(Integer code){
        return Objects.equals(code,EXECUTING.getCode());
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
